package com.woniuxy.microsystemuapserver.mapper;


import com.woniuxy.microsystemuapserver.bean.DeptBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 部门 mapper
 * @Author: huhenggg
 * @Date: 2021/1/25 0025 下午 4:33
 */
@Mapper
public interface DeptMapper {

    /**
     * 查询所有的部门
     * @return
     */
    @Select("SELECT `id`,`dept_number` AS deptNumber,`dept_name` AS deptName " +
            "FROM `dept_info`" +
            "WHERE `status` = 1;")
    List<DeptBean> findAll();


    /**
     * 修改部门信息
     * @param deptBean
     * @return
     */

    int updateDeptBean(@Param("dd")DeptBean deptBean);


}
